package com.mdd.front.validate.comment;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.List;

/**
 * 服务评价参数
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value = "评价提交请求对象", description = "评价提交请求对象")
public class GoodsCommentParam implements Serializable {

    private static final long serialVersionUID = 1L;

    public interface create {
    }

    public interface update {
    }

    public interface delete {
    }

    @ApiModelProperty(value = "id")
    @NotNull(message = "id参数必传且需大于0", groups = {update.class, delete.class})
    private Long id;

    @ApiModelProperty(value = "服务id")
    @NotNull(message = "goodsId参数缺失", groups = {create.class})
    @DecimalMin(value = "0", message = "goodsId参数值不能少于0", groups = {create.class})
    private Long goodsId;

    @ApiModelProperty(value = "用户id")
    private Long userId;

    @ApiModelProperty(value = "订单ID")
    @NotNull(message = "orderGoodsId参数缺失", groups = {create.class,})
    @DecimalMin(value = "0", message = "orderGoodsId参数值不能少于0", groups = {create.class})
    private Long orderId;

    @ApiModelProperty(value = "服务评价星级 1 一星 2 二星 3三星 4四星 5五星")
    @NotNull(message = "serviceComment参数缺失", groups = {create.class})
    @DecimalMin(value = "0", message = "serviceComment参数值不能少于0", groups = {create.class})
    private Integer serviceComment;

    @ApiModelProperty(value = "内容")
    @NotNull(message = "comment参数缺失", groups = {create.class})
    private String comment;

    @ApiModelProperty(value = "服务评价等级 0 好评 1中评 2差评")
    @NotNull(message = "commentLevel参数缺失", groups = {create.class})
    @DecimalMin(value = "0", message = "commentLevel参数值不能少于0", groups = {create.class})
    private Integer commentLevel;

    @ApiModelProperty(value = "评论图片")
    private List<String> commentImages;
}
